package com.swpu.service_sport.controller;


import com.swpu.commonutils.R;
import com.swpu.service_sport.entity.vo.SportCategoryVo;
import com.swpu.service_sport.service.SportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author chaichai
 * @since 2024-02-23
 */
@RestController
@RequestMapping("/service_sport/sport")
public class SportController {
    @Autowired
    private SportService sportService;
    @GetMapping("/getSportListInfo")
    public R getSportListInfo(){
        List<SportCategoryVo> sportListInfo = sportService.getSportListInfo();
        return R.ok().data("sportCategoryList",sportListInfo);
    }
}

